package com.gitee.chenyaohua.oa.from.vo;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.gitee.chenyaohua.oa.anno.FilterField;
import com.gitee.chenyaohua.oa.from.dto.EncryptionType;
import com.gitee.chenyaohua.oa.from.validator.UserLoginCheck;
import lombok.Data;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


@Data
public class UserLoginFrom {

	@FilterField(type= EncryptionType.DESEDE)
	@JsonProperty(value = "admin")
	@NotBlank(groups = UserLoginCheck.class,message = "邮箱不能是空")
	@Size(groups = UserLoginCheck.class,message = "邮箱必须小于40个字符",max = 40)
	@Email(groups = UserLoginCheck.class,message = "邮箱不符合规则")
    private String userEmail;

	@FilterField(type= EncryptionType.MD5)
	@JsonProperty(value = "password")
	@NotBlank(groups = UserLoginCheck.class,message = "密码不能是空")
	@Size(groups = UserLoginCheck.class,message = "密码必须小于20个字符",max = 20,min=6)
	private String userPasswrod;

	
}
